home *** CD-ROM | disk | FTP | other *** search
/ Larry Magid's Essential Internet / Larry Magid's Essential Internet (Quarterdeck Corporation)(1995).ISO / qsockpro.qip / BEST.MPS < prev    next >
Text File  |  1995-10-09  |  1KB  |  72 lines

  1. # Best Internet Communications, Inc. PPP login script
  2. # Copyright 1995 Quarterdeck Corporation
  3. # Authored 6/5/95 kflick@netcom.com
  4.  
  5. #define the variables we will need
  6.  
  7. String username
  8. String password
  9. String framing
  10. String IPAddress
  11.  
  12. # uncomment for debugging
  13. #Trace on
  14.  
  15. # reset maximum login timeout.
  16.  
  17. SetTimeout      60
  18.  
  19. CfgGetValue "Username" username
  20.  
  21. if result = 0 then
  22.  
  23.     GetInput "Enter your user name" username
  24.  
  25.     if result = 0 then
  26.         Print "Warning, no username entered"
  27.      else
  28.         Print "Username set to ["; username; "]"
  29.      endif
  30.  
  31. endif
  32.  
  33. # get password from access method
  34.  
  35. CfgGetValue "Password" password
  36.  
  37. # if the Password field is empty, prompt the user for it.
  38.  
  39. if result = 0 then
  40.     GetPassword "Enter your password" password
  41.  
  42.     if result = 0 then
  43.         Print "Warning, no password entered"
  44.      else
  45.         # NOTE: Don't print password.
  46.         Print "Password set."
  47.     endif
  48.  
  49. endif
  50.  
  51.  
  52. CommWaitFor "login:"           # wait for login prompt 
  53. #delay 5
  54. CommSend    username            # send user name 
  55. CommSend    "%r"                # send carriage return
  56.  
  57. CommWaitFor "assword"        # wait for password prompt 
  58. #delay 5
  59. CommSend    password            # send password 
  60. CommSend    "%r"                # send carriage return
  61.  
  62. CommWaitFor "to "        # wait for ip address 
  63. CommReadIPAddr IPAddress
  64. if result>0 then
  65.     CfgSetValue "IPAddress" IPAddress
  66.     print " "
  67.     print "IP Address set to ["; IPAddress; "]" 
  68. endif
  69.  
  70.  
  71. END
  72.